package com.huaxin.feignclient.device.models;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.huaxin.hxenum.enums.FireRating;
import com.huaxin.hxenum.enums.VentilationType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
public class ElectricalRoom {
    /**
     * 唯一ID（UUID）- 主键
     */
    private String id;

    /**
     * 自增序列号（唯一索引，非主键）
     */
    private Long autoId;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createdAt;

    /**
     * 创建人
     */
    private String createdBy;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updatedAt;

    /**
     * 更新人
     */
    private String updatedBy;

    /**
     * 是否删除（0:未删, 1:已删）
     */
    private Integer isDeleted = 0;

    /**
     * 删除时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime deletedAt;

    /**
     * 删除人
     */
    private String deletedBy;

    /**
     * 组织ID
     */
    private String orgId;

    @Schema(description = "配电房名称", example = "1#楼地下一层配电室")
    private String roomName;

    @Schema(description = "编号（唯一）", example = "RM-01")
    private String roomCode;

    @Schema(description = "详细位置", example = "1号楼B1层东侧")
    private String location;

    @Schema(description = "所在楼层", example = "B1")
    private String floor;

    @Schema(description = "面积（㎡）", example = "50.00")
    private BigDecimal area;

    @Schema(description = "建造年份", example = "2018")
    private Integer constructionYear; // YEAR 类型可用 Integer 表示

    @Schema(description = "防火等级", example = "1")
    private FireRating fireRating;

    @Schema(description = "通风类型", example = "natural")
    private VentilationType ventilationType;

    @Schema(description = "备注")
    private String description;

    @Schema(description = "家庭ID", example = "family-01")
    private String familyId;
}
